home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 501-525 / disk_511 / less / readme < prev    next >
Text File  |  1992-05-06  |  8KB  |  153 lines

  1. This is a revision of a port (by Bob Leivian) of version 73 of the "Less"
  2. pager from Unix (Fred Fish #149).
  3.  
  4. Less is an Ascii text pager with the following features:
  5.  
  6.     -Compatible with WB 1.3 and 2.0 on any Amiga
  7.     -Handles NTSC, PAL, overscan, etc. screens
  8.     -Works with pipes (with a consenting shell or pipe: device)
  9.     -Permits multiple file selection, CLI or Workbench
  10.     -Forward & backward movement in a variety of ways
  11.     -Powerful searches, using regular expression patterns
  12.     -Handles alternative fonts
  13.     -Handles international Ascii characters
  14.     -Handles boldface, underline, etc. in ANSI or Unix nroff style
  15.     -Customizable, using environment or command options
  16.     -Residentable
  17.  
  18. Less is still the only pager I know of on the Amiga that handles pipes
  19. and multiple file selection.  To me, these two features are essential
  20. in a pager.  If your shell supports pipes and expands wildcards (I use
  21. Steve Koren's outstanding SKsh), you can write things like 'ls | less'
  22. or 'less *.readme'.
  23.  
  24. Less has been around for a long time in the Unix world, and has been
  25. ported to the Amiga before.  Unfortunately, the earlier Amiga port would
  26. not run on Amiga 3000s and was seriously crippled in the areas of support
  27. for non-NTSC or overscan screens and international characters.
  28.  
  29. The current version opens a full-sized window on your workbench screen
  30. (even PAL or overscan), and displays as much text from the input
  31. files as it can using the standard system font.  It is smart enough to
  32. adjust these values even if you resize the window using the resizing
  33. gadget.  It responds to the standard window close gadget, and of course
  34. front/back, drag bar, and 2.0 zoom gadgets.
  35.  
  36. You can specify less than a full-sized window from the command line by
  37. a new option, -[N,N,N,N].  The four N's are left-edge position, top-edge
  38. position, width, and height in pixels.  Any may be omitted, defaulting
  39. to 0.  Zeros in the last two positions mean full width or height.  If
  40. numbers at the end of the list are omitted, their preceding commas may
  41. be omitted also.  If any of the Ns are negative, they are taken to be
  42. relative to the bottom right corner of the screen.  Thus, [-200,-100,
  43. 200,100] would be a 200 by 100 window in the bottom right corner of the
  44. screen, and [0,12,0,-100] would be a full-width window leaving the title
  45. bar of the screen and the bottom 100 scan lines exposed.  There is a
  46. minimum window size, and if it is violated, or if the window would fall
  47. off the edges of the screen, Less simply forces things to conform.
  48.  
  49. It recognizes most ANSI commands to set underlining, italics, boldfacing,
  50. or inverse video, in addition to the backspace protocols for boldfacing
  51. and underlining that Less has always recognized (if neither of the two
  52. -u options is set).
  53.  
  54. This version of Less is more "Amigatised" in its use of the Amiga keyboard.
  55. It allows you to scroll backward in the file by one line using the
  56. backspace key--a sort of logical consequence, IMHO, of the carriage
  57. return key's use for scrolling forward by single lines.  The arrow keys
  58. (cursor up, down, left and right) are active:  up and down move you
  59. through the document by pages; left and right by lines; shifted left
  60. and right by half-pages.  The HELP key displays a help message.  I
  61. have added ^N and ^P for next and previous line, ^V for next page, ^S
  62. for forward search, and '<' and '>' for go to top and bottom of file, in
  63. response to a request from an emacs-type.
  64.  
  65. Workbench support is expanded to handle multiple selection of files to
  66. be viewed.  You cannot enter -options from workbench like you can from
  67. CLI, but Less *does* act upon whatever options are set in the environment
  68. variable LESS.
  69.  
  70. Less version 1.4Z recognizes the international character set between
  71. characters 160 and 255 (decimal).
  72.  
  73. The regular expression pattern matching in searches has been enabled.
  74. These use the powerful Unix 'ed' style patterns.  Any pattern consisting
  75. only of letters, numbers, and spaces will simply search for the given
  76. pattern.  But you can use one or more of the metacharacters [].^$()|*+ to
  77. engineer very sophisticated searches.  The '.' stands for any single
  78. character, and 'x*' stands for 0 or more occurances of x (so 'x.*y'
  79. would match anything that started with x and ended with y).  'x+'
  80. works the same way, for 1 or more occurances of x.  'x?' matches 0 or 1
  81. occurances of x (i.e. 'x' or nothing).  '[abc]' matches any single
  82. occurance of 'a', 'b', or 'c'.  '[^abc]' matches any single character
  83. except 'a', 'b', or 'c'.  '[a-m]' matches any single character in the
  84. range 'a' through 'm' inclusive.  '^x' finds x only at the beginning of
  85. a line; 'x$' only at the end of a line.  'x|y' matches either x or y.  The
  86. various pieces can be combined, of course, and grouped with parentheses.
  87. '([Aa]ny|[Ee]ach) +of you' would find any phrase beginning with 'any'
  88. or 'each' (possibly capitalized) followed by one or more blanks, followed
  89. by 'of you'. ' (can)?not ' matches either 'not' or 'cannot', but not
  90. 'nothing' or 'cancel'.  '[^a-zA-Z]i[^a-zA-Z]' finds all occurances of a
  91. variable 'i' in a program, but does not find 'i' embedded in other
  92. variable names or words.  To match a metacharacter literally, precede it
  93. with a backslash; e.g. '\.  \*' would match a period followed by two
  94. spaces and an asterisk.
  95.  
  96. With resizeable windows, the number of lines to scroll for page-forward
  97. and page-back commands is now recalculated each time the screen is
  98. resized.  The -z command now sets the maximum number of lines that will
  99. be scrolled for full-screen movement.  The space bar, for instance, will
  100. scroll either -z lines, or a full screen, whichever is less.
  101.  
  102. Half-page moves used to be fixed at 10 lines (although alterable
  103. by prefixing a u or d command with a different number).  With resizable
  104. screens, this didn't seem to make much sense any more, so I also have
  105. Less automatically compute the half-page size on startup and resizing of
  106. the window.
  107.  
  108. Many bugs or unimplemented features have been fixed; they're generally
  109. small things that casual users will never notice.  The Q and q options
  110. work:  they quiet the visible bell, since there is no audible bell.  The
  111. E and e options have changed meaning slightly:  You can exit a file upon
  112. any attempted forward movement beyond eof (E), or only upon an attempted
  113. full-page movement (e, the default), or you can be barred from exiting
  114. via text movement commands (neither e nor E).  The old business of closing
  115. the window immediately (old E) upon finding eof, before you have time to
  116. read the last page of text, was judged useless in the Amiga environment!
  117. C was made the default for painting screens, for speed.  This version
  118. takes greater pains to assure that the prompt at the bottom of the screen
  119. fits in a single line; it is shortened if necessary.  Some bug fixes have
  120. made it harder (I think!) to crash Less (no pun intended).
  121.  
  122. Signal handling has been improved:  ^C in the Less window will abort
  123. searches, but is otherwise ignored with a warning message.  A BREAK
  124. signal from the launching CLI (^C in the CLI window, if there is one,
  125. or AmigaDOS "break" command directed at Less) will immediately
  126. terminate the process (with cleanup, of course).  Error handling in
  127. connection with reading the files is much improved, with emphasis on
  128. more informative error messages.
  129.  
  130. I removed two "features" of the old Amiga port:  Less1.4Z no longer
  131. internally expands wildcarded filenames, and it no longer prints files
  132. on the system printer.  I think both of these functions are better done
  133. by other means; e.g. SKsh or some other shell for wildcard expansion,
  134. and copying to prt: or using one of the many printer utilities to get
  135. printouts.  Less is a good pager; it doesn't need to be bogged down and
  136. fattened up with random other capability.  In any event, since I didn't
  137. need or want these functions, it seemed a lot easier to remove them
  138. than to rewrite them.
  139.  
  140. The "clean data" option of the original Unix no longer makes sense in
  141. this version, and has been deleted.
  142.  
  143. Less1.4Z was compiled with SAS-C (formerly Lattice) v5.10a, using the
  144. version 2.0 include files.
  145.  
  146. --------------------------------------------------------------
  147.  
  148. Ray Zarling
  149. California State Univ. Stanislaus
  150. Turlock, CA 95380
  151.  
  152. rayz@csustan.edu
  153.